"""
File: login_page.py
Author: ershixiong
Date: 2023/11/23
describe:

"""
import os.path

from project202311_wework.wework.wework_po.page_object.base_page import BasePage


class LoginPage(BasePage):
    __BASE_URL = 'https://work.weixin.qq.com/wework_admin/frame#index'

    def login(self):
        cookie_data_path = f'{os.path.dirname(os.path.dirname(os.path.abspath(__file__)))}/data/cookies.yaml'
        self.do_set_cookies(cookie_data_path)
        self.driver.list(self.__BASE_URL)

        from project202311_wework.wework.wework_po.page_object.home_page import HomePage
        return HomePage(self.driver)
